import os, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from string import sqString

def BF(cstr1, cstr2):
    sqstr1 = sqString()
    sqstr2 = sqString()
    sqstr1.StrAssign(cstr1)
    sqstr2.StrAssign(cstr2)
    max_s = sqstr1.getsize()
    max_t = sqstr2.getsize()
    i = 0
    while i < (max_s - max_t + 1):
        j = 0
        while j < max_t:
            if sqstr1[i] == sqstr2[j]:
                i += 1
                j += 1
            else:
                i = i - j + 1
                break
            return i - j
    return False
if __name__ == "__main__":
    cstr1 = "1aaaaas"
    cstr2 = "aaaaa"
    print(BF(cstr1, cstr2))